package org.seedltd.upms.model.detection.form;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.seedltd.core.validation.Save;
import org.seedltd.core.validation.Update;
import org.seedltd.upms.enums.EnableStatus;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 *
 * 产品检测项表单
 * 
 * @author laizuan
 * @version 1.0
 * @since 2021/08/25
 */
@Getter
@Setter
public class DetectionProductItemForm {

    /**
     * 主键
     */
    @NotNull(message = "修改数据ID不能为空，请重新进入操作页面。", groups = {Update.class})
    private Long id;

    /**
     * 检测项名称
     */
    @Length(message = "检测项名称长度不能超过20个字符", max = 20, groups = {Save.class})
    @NotBlank(message = "检测项名称不能为空", groups = {Save.class})
    private String itemName;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = {Save.class})
    private Integer sortNo;

    /**
     * 异常扣减分数
     */
    @NotNull(message = "异常扣减分数不能为空", groups = {Save.class})
    private Integer scope;

    /**
     * 检测项目可选值
     */
    @Length(message = "检测项目可选值长度不能超过255个字符", max = 255, groups = {Save.class})
    @NotBlank(message = "检测项目可选值不能为空", groups = {Save.class})
    private String itemValues;

    /**
     * 启用状态(1启用 0禁用)
     */
    @NotNull(message = "启用状态不能为空", groups = {Save.class})
    private EnableStatus enabled;

    /**
     * 备注
     */
    @Length(message = "备注长度不能超过100个字符", max = 100, groups = {Save.class})
    private String remark;

}
